﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CategorySubList.ascx.cs" Inherits="BackEnd_CategorySubList" %>
<%@ Register src="CategorySubModify.ascx" tagname="CategorySubModify" tagprefix="uc1" %>
<script language="javascript" type="text/javascript">
		function confirmDelete(id)
		{
			if (confirm("Bạn có chắc chắn muốn xóa không ?"))
			{
			    window.location="<%=_Url%>"+id;
			}
		}
</script>
<table id="Table2" cellspacing="1" cellpadding="1" width="100%" border="0">
    <tr>
        <td class="toolbar" width="100%">
            <b>         <%=this._Session %>   
            </b>
        </td>
    </tr>
    <tr style="text-align: left">
        <td align="center" colspan="4" width="100%">
            <uc1:CategorySubModify ID="CategorySubModify1" runat="server" />
        </td>
    </tr>
    <tr style="text-align: left">
        <td align="center" colspan="4" style="width: 908px">
            <asp:Label ID="labMessage" runat="server" Width="100%" ForeColor="Red" Font-Bold="True"></asp:Label>
        </td>
    </tr>
    <tr>
        <td align="left">
            <asp:GridView runat="server" ID="grid" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px"
                RowStyle-BorderWidth="0" RowStyle-BorderStyle="None" Width="100%" AlternatingRowStyle-BackColor="#f8f8f8"
                AlternatingRowStyle-BorderColor="#f8f8f8" HeaderStyle-BackColor="#F1F1F1" CellPadding="4"
                AutoGenerateColumns="False" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True"
                OnRowDeleting="grid_RowDeleting" OnRowEditing="grid_RowEditing" OnRowUpdating="grid_RowUpdating"
                AllowSorting="True" BackColor="White" ShowFooter="True" AllowPaging="True" OnPageIndexChanging="grid_PageIndexChanging" PageSize="20">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <a href="#" onclick="javascript:confirmDelete(<%#Eval(Component.ColumCategorySub._Id)%>)" value="xoa" style="width: 76px">Xóa</a>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tên">
                        <ItemTemplate>
                         <%#Eval(Component.ColumCategorySub._Name)%>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox runat="server" ID="txtName" Text='<%#Eval(Component.ColumCategorySub._Name)%>'  TextMode="MultiLine" />
                        </EditItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tên EL">
                        <ItemTemplate>
                             <%#Eval(Component.ColumCategory._NameEL)%>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox runat="server" ID="txtNameEL" Text='<%#Eval(Component.ColumCategorySub._NameEL)%>'  TextMode="MultiLine" />
                        </EditItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Thứ tự">
                        <ItemTemplate>
                           <%#Eval(Component.ColumCategorySub._Priority)%>
                        </ItemTemplate>
                         <EditItemTemplate>
                            <asp:TextBox runat="server" ID="txtPriority" Text='<%#Eval(Component.ColumCategorySub._Priority)%>'/>
                        </EditItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Kích hoạt">
                        <ItemTemplate>
                            <%#Eval(Component.ColumCategorySub._Active)%>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:DropDownList ID="ddLAct" runat="server">
                                <asp:ListItem>true</asp:ListItem>
                                <asp:ListItem>false</asp:ListItem>
                            </asp:DropDownList>
                        </EditItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                     <asp:TemplateField HeaderText="Tên">
                        <ItemTemplate>
                          <a href="<%#Eval(Component.ColumCategorySub._UrlAdmin)%>">Các sản phẩm</a>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                </Columns>
                <RowStyle BorderStyle="None" BorderWidth="0px" />
                <HeaderStyle BackColor="#F1F1F1" />
                <AlternatingRowStyle BackColor="#F8F8F8" BorderColor="#F8F8F8" />
            </asp:GridView>
        </td>
    </tr>
</table>
